#include "SimulationViewCamera.h"

SimulationViewCamera::SimulationViewCamera( DirectX::XMVECTOR translation, DirectX::XMVECTOR roationQuaternion ) :
	Camera(DirectX::XMFLOAT3(0.f, 0.f, 0.f)),
	m_translation(translation),
	m_rotationQuaternion(roationQuaternion)
{
}

SimulationViewCamera::~SimulationViewCamera( void )
{
}

DirectX::XMMATRIX SimulationViewCamera::GetViewMatrix( void )
{
	return DirectX::XMMatrixInverse(nullptr, DirectX::XMMatrixTranslationFromVector(m_translation))
		* DirectX::XMMatrixInverse(nullptr, DirectX::XMMatrixRotationQuaternion(m_rotationQuaternion));
}

void SimulationViewCamera::SetRotation( DirectX::XMVECTOR rotationQuaternion )
{
	m_rotationQuaternion = rotationQuaternion;
}

void SimulationViewCamera::SetTranslation( DirectX::XMVECTOR translation )
{
	m_translation = translation;
}